"""
_*_ : utf-8 _*_ 
@Time: 2023/10/27 21:32
@Author: LWK
@File: 009_变量类型
@Project: demo01
"""
# Number
#       int
int_var = 500

#       float
float_var = 1.2

# boolean
bool1 = True
bool0 = False

# string
name1 = 'lwk'
name2 = "LWK"

# list
name_list = ['L', 'W', 'K']
print(name_list)

# tuple     元组
age_tuple = (1, 2, "3")
print(age_tuple)

# dict      字典
# 应用场景：scrapy框架使用
person = {'name': 'LWK', 'age': 18}
print(person)

a = '123'
print(type(a))

a1 = int(a)
print(type(a1))

a2 = float(a)
print(type(a2))


b = 1.99
print(type(b))

b1 = int(b)
print(b1)

b2 = str(b)
print(type(b2), b2)

c = True
print(type(c))

c1 = int(c)
print(c1)

d = '12.34'
d1 = float(d)
print(d1)

print(bool(1))
print(bool("1"))
print(bool("0"))
print(bool(""))
print(bool("123ddd"))
print(bool([]))
print(bool([1]))
print(bool(0))
